﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Adp.Pleiade.Fwk.Batch;
using Adp.Pleiade.Fwk.Common;
using System.Data.SqlClient;
using Adp.Pleiade.Fwk.Entity;

namespace Pleiade.Mtr // à compléter
{
    public class CursorBatchActivity : BatchActivitySQL<StandartBatchSession>
    {        
        #region Implémentations obligatoires

        public override string SQLRequest
        {
            get
            {
                return "select / exec dbo. ...";
            }
        }

        #endregion

        #region Implémentations recommandées

        protected override void DoSetDynamicParameters()
        {
            // récupération des paramètres du batch
        }

        public override string SQLCountRequest
        {
            get
            {
                return "select count(...";
            }
        }

        protected override RecordList GetDataBeforeBSTreatment(RecordList aRecordList)
        {
            return new BusinessPackage(aRecordList) { /* membres ... */ };
        }

        #endregion

    }

    public class BusinessPackage : RecordList
    {
        // déclaration des membres

        public BusinessPackage(RecordList recordList)
        {
            this.InitWith(recordList);
        }
    }
}
